<template>
	<view class="um-avatar" :style="{ width: width, height: height }">
		<slot></slot>
		<!-- <um-icon name="people" :size="24" color="#e5e5e5" v-if="!src"></um-icon>
		<um-image :src="src" :width="width" :height="height" mode="sc" v-else></um-image> -->
	</view>
</template>

<script lang="ts" setup>
withDefaults(
	defineProps<{
		src?: string;
		width?: string;
		height?: string;
	}>(),
	{
		width: '100rpx',
		height: '100rpx'
	}
);
</script>

<style lang="scss" scoped>
.um-avatar {
	border: 1px solid #e5e5e5;
	border-radius: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: hidden;
}
</style>